package org.csu.question.entity.po;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

import java.time.LocalDateTime;

@Data
@TableName("questions")
public class Questions {
    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("title")
    private String title;

    @TableField("content")
    private String content;

    @TableField("answer")
    private String answer;

    @TableField("options")
    private String options; // JSON格式存储选项

    @TableField("knowledge_point_id")
    private Long knowledgePointId;

    @TableField("difficulty")
    private String difficulty; // EASY, MEDIUM, HARD

    @TableField("explanation")
    private String explanation; // 题目解析

    @TableField(value = "created_at", fill = FieldFill.INSERT)
    private LocalDateTime createdAt;

    @TableField(value = "updated_at", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updatedAt;

    // 非数据库字段
    @TableField(exist = false)
    private KnowledgePoint knowledgePoint;
}
